package pers.karl.design.basic.strategy.impl;

import pers.karl.design.basic.strategy.PriceStrategy;

import java.math.BigDecimal;

/**
 * 折扣策略
 * @author karl
 */
public class PriceDiscountStrategy implements PriceStrategy {

    public PriceDiscountStrategy() {
        System.out.println("折扣策略实例化");
    }

    @Override
    public BigDecimal calcPrice(BigDecimal price) {
        return price.multiply(new BigDecimal("0.9"));
    }

}
